/**
 * 
 */
package com.json.model;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

import org.appfuse.model.BaseObject;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Indexed;

/**
 * @author vijay_000
 *
 */

@Entity
//@Indexed
public class TaskMaster extends BaseObject {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue
	private Long id;
	
	@Column(length=50, name="task_description")
//	@Field
	private String taskDescrp;
	@Column
	private Timestamp startTs;
	@Column
	private Timestamp endTs;
	@Column
	private Timestamp lastUpdTs;
	@Column
	private String lastUpdUserId;
	@Column
	private String status;
	//possible values - C- Completed, P- Planned, S-Started, I- In progress

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		TaskMaster other = (TaskMaster) obj;
		if (endTs == null) {
			if (other.endTs != null)
				return false;
		} else if (!endTs.equals(other.endTs))
			return false;
		if (startTs == null) {
			if (other.startTs != null)
				return false;
		} else if (!startTs.equals(other.startTs))
			return false;
		if (taskDescrp == null) {
			if (other.taskDescrp != null)
				return false;
		} else if (!taskDescrp.equals(other.taskDescrp))
			return false;
		return true;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((endTs == null) ? 0 : endTs.hashCode());
		result = prime * result + ((startTs == null) ? 0 : startTs.hashCode());
		result = prime * result
				+ ((taskDescrp == null) ? 0 : taskDescrp.hashCode());
		return result;
	}

	/* (non-Javadoc)
	 * @see org.appfuse.model.BaseObject#toString()
	 */
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return null;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTaskDescrp() {
		return taskDescrp;
	}

	public void setTaskDescrp(String taskDescrp) {
		this.taskDescrp = taskDescrp;
	}

	public Timestamp getStartTs() {
		return startTs;
	}

	public void setStartTs(Timestamp startTs) {
		this.startTs = startTs;
	}

	public Timestamp getEndTs() {
		return endTs;
	}

	public void setEndTs(Timestamp endTs) {
		this.endTs = endTs;
	}

	public Timestamp getLastUpdTs() {
		return lastUpdTs;
	}

	public void setLastUpdTs(Timestamp lastUpdTs) {
		this.lastUpdTs = lastUpdTs;
	}

	public String getLastUpdUserId() {
		return lastUpdUserId;
	}

	public void setLastUpdUserId(String lastUpdUserId) {
		this.lastUpdUserId = lastUpdUserId;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

}
